﻿@model NewLife.CMX.ICategory
@{
    var Pager = ViewBag.Pager as Pager;
}
@if (Pager.PageCount > 1)
{
    <div class="page">
        <span class="cor01">页数：@Pager.PageIndex/@Pager.PageCount</span>
        <a class="first" href="@(this.GetCategoryUrl(Model))" title="首页">首页</a>
        @if (Pager.PageIndex > 1)
        {
            <a class="prev" title="上一页" href="@(this.GetCategoryUrl(Model, Pager.PageIndex - 1))">&lt;</a>
        }
        @for (int i = 1; i <= Pager.PageCount; i++)
        {
            if (i == Pager.PageIndex)
            {
                <a class="on">@i</a>
            }
            else
            {
                <a href="@(this.GetCategoryUrl(Model, i))">@i</a>
            }
        }
        @if (Pager.PageIndex < Pager.PageCount)
        {
            <a class="next" title="下一页" href="@(this.GetCategoryUrl(Model, Pager.PageIndex + 1))">&gt;</a>
        }
        <a class="first" title="末页" href="@(this.GetCategoryUrl(Model, Pager.PageCount))">末页</a>
    </div>
}
